const path = require('path');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const webpack = require('webpack');
module.exports={
    mode:'production',
    entry:{
        vue:['vue']
    },
    output:{
        filename:'dll_[name].js',
        path:path.resolve(__dirname,'../dist'),
        library:'dll_[name]'
    },
    plugins:[
        new CleanWebpackPlugin(),
        //打包一次不在打包的插件，生成mainfest
        new webpack.DllPlugin({
            name:'dll_[name]',//name == library
            path:path.resolve(__dirname,'../dist','manifest.json')
        })
    ]
}